import request from "@/utils/request";

// 查询参数列表
export function GetListAPI(params) {
  return request({
    url: "/system/printConfig/list",
    method: "GET",
    params,
  });
}

// 新增
export function AddDataAPI(data) {
  return request({
    url: "/system/printConfig/add",
    method: "POST",
    data,
  });
}

// 修改
export function EditDataAPI(data) {
  return request({
    url: "/system/printConfig/edit",
    method: "PUT",
    data,
  });
}

// 删除
export function DelDataAPI(data) {
  return request({
    url: "/system/printConfig/" + data,
    method: "DELETE",
  });
}

// 查看详情
export function GetDailtAPI(data) {
  return request({
    url: "/system/printConfig/getView/" + data,
    method: "GET",
  });
}

// 查看配置
export function GetConfigAPI(data) {
  return request({
    url: "/system/printConfig/getView/" + data,
    method: "GET",
  });
}
// 配置保存
export function ConfigAPI(data) {
  return request({
    url: "/system/printConfig/del",
    method: "POST",
    data,
  });
}

// 下拉到页面数据
export function GetMenuPageAPI() {
  return request({
    url: "/system/menu/menuPage",
    method: "GET",
  });
}

// 查询打印字段
export function GetDetailsAPI(data) {
  return request({
    url: "/system/template-disposition/getDataByMenuId/" + data,
    method: "GET",
  });
}

// 配置字段
export function ConfigFieidAPI(data) {
  return request({
    url: "/system/template-disposition/add",
    method: "POST",
    data,
  });
}

// 配置字段
export function ConfigTemplateAPI(data) {
  return request({
    url: "/system/printConfig/configContent",
    method: "POST",
    data,
  });
}

// 修改默认状态
export function UpdateDefaultValueAPI(data) {
  return request({
    url: "/pureut-system/printConfig/updateDefaultValue",
    method: "PUT",
    data,
  });
}
